var express = require('express');
var router = express.Router();

const UserService = require("../servers/user/user_servers.js");

/* GET users listing. */
router.get('/', function(req, res, next) {
  res.send('respond with a resource');
});

router.post('/login', UserService.login);

//注册：app路由前缀，完整路径"/api/users/register"
router.post('/register', UserService.register);

//注销：app路由前缀，完整路径"/api/users/logout"
router.get('/logout', UserService.logout);

router.get('/check', UserService.check);

router.get('/delete', UserService.deleteById);

router.get('/update', UserService.updateById);

module.exports = router;
